/**
 * Created by Administrator on 2016/7/14.
 */
function xiala(menuLev){
    $(menuLev).on('click',function(){
        $(this).next(menuLev+'-ul').slideToggle();
        $(this).find('i').toggleClass('xiasanjiao','sanjiao');
    })
}

function size(){
    var oHeadHei = 50;
    var oLeftWid = 225;
    var oT=$(window).height();
    var oW=$(window).width();
    var oCha=oT-oHeadHei;
    var oCha2=oW-oLeftWid;
    $('#main').css({
        'width':'100%',
        'height':oCha
    });
    //$('.yh-left').css('height',oCha);
    $('.right-content').css('width',oCha2);
    $(window).on('resize',function(){
        var oT=$(window).height();
        var oW=$(window).width();
        var oCha=oT-oHeadHei;
        var oCha2=oW-oLeftWid;
        $('#main').css({
            'width':'100%',
            'height':oCha
        });
        //$('.yh-left').css('height',oCha);
        $('.right-content').css('width',oCha2)
    });
}

$(function(){
    var lev = 3;  //菜单最高层级
    for( var i = 1; i< lev+1;i++){
        xiala('.lev'+i);
    }
    size();
	
	$(".header .user").hover(function(){
        $(".tuichu").show();
    },function(){
        $(".tuichu").hide();
    })
});
